<template>
	<view class="">
		<view class="scroll-li">
			<view class="scroll-list">
				<view class="name-wrap">
					<view class="name-wrap-left">
						<view class="logo" @click="personalDack(item._creatememid)">
							<image v-if="item.logo" :src="item.logo.slice(0,4) == 'http'?item.logo:$baseUrl+item.logo" mode="aspectFill" lazy-load></image>
							<image v-else :src="$baseUrl+'/img/no.png'" mode="aspectFill"></image>
						</view>
						<view class="name-wrap-nickname">
							{{item.nickname}}
						</view>
					</view>
					<view class="name-wrap-right" @click.stop="hideData">
						<u-icon name="close-circle" size="50" color="#c40200"></u-icon>
					</view>
				</view>
				<view class="title" @click.stop="goCircleDetail">
					{{item.title}}
				</view>
				<slot></slot>
				<!-- <view class="cate">
					<text class="cate-list">金牌讲师</text>
					<text class="cate-list cate-list-fc">教育服务</text>
					<text class="cate-list cate-list-fc">广告</text>
				</view> -->
				<!-- <view class="line"></view> -->
				<view class="tap">
					<view class="tap-list" @click="sharenr">
						<u-icon name="line-134" custom-prefix="custom-icon" size="30" style="margin-right: 16rpx;"></u-icon>分享
					</view>
					<view class="tap-list" @click.stop="goCircleDetail">
						<u-icon name="pinglun" custom-prefix="custom-icon" size="30" style="margin-right: 16rpx;"></u-icon>&nbsp;&nbsp;{{item.pjzs}}
					</view>
					<view class="tap-list" @click.stop="goCircleDetail">
						<u-icon name="star" size="30" style="margin-right: 16rpx;"></u-icon>&nbsp;&nbsp;{{item.sccounts}}
					</view>
					<view class="tap-list" @click.stop="goCircleDetail">
						<u-icon name="thumb-up" size="30" style="margin-right: 16rpx;"></u-icon>&nbsp;&nbsp;{{item.dzcounts}}
					</view>
				</view>
			</view>
		</view>
		<view class="fenge"></view>
	</view>
</template>

<script>
	export default{
		props:{
			item:{
				type:Object,
				default(){
					return {}
				}
			}
		},
		data(){
			return {
				$baseUrl:""
			}
		},
		created() {
			this.$baseUrl = this.baseUrl
		},
		methods:{
			sharenr() {
				uni.share({
					provider: "weixin",
					scene: "WXSceneSession",
					type: 0,
					href: "http://uniapp.dcloud.io/",
					title: "uni-app分享",
					summary: "我正在使用HBuilderX开发uni-app，赶紧跟我一起来体验！",
					imageUrl: "https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/d8590190-4f28-11eb-b680-7980c8a877b8.png",
					success: function(res) {
						console.log("success:" + JSON.stringify(res));
					},
					fail: function(err) {
						console.log("fail:" + JSON.stringify(err));
					}
				});
			},
			personalDack(sysMemID){
				if(JSON.parse(this.$store.state.userIn).id !=sysMemID){
					this.$u.route("/pages/myuser/personal/personal",{
						sysMemID:sysMemID,
					})
				}else{
					this.$u.route({
						type:'tab',
						url: 'pages/myuser/myuser',
					})
				}
				
			},
			goCircleDetail(){
				uni.navigateTo({
					url:"/pages/circle/circle-detail/circle-detail?id=" + this.item.id
				})
			},
			hideData(){
				this.$emit('hideData',this.item.id)
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	.scroll-list{
		padding: 26rpx 30rpx 0rpx 30rpx;
		.title{
			font-size: 32rpx;
			margin-bottom: 30rpx;
		}
		.cate{
			font-size: 22rpx;
			margin-top: 20rpx;
			.cate-list{
				display: inline-block;
				margin-right: 26rpx;
			}
			.cate-list-fc{
				color: #999999;
			}
		}
		.line{
			width: 100%;
			height: 1rpx;
			margin-top: 26rpx;
			border-bottom: 1px solid #ebebeb;
		}
		.scroll-list-child{
			display: flex;
			justify-content: space-between;
			padding-bottom: 28rpx;
			.left-desc{
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				height: 142rpx;
				width: 100%;
				.desc{
					font-size: 32rpx;
				}
			}
			.right-img{
				margin-left: 20rpx;
				width: 318rpx;
				height: 142rpx;
				border-radius: 16rpx;
				overflow: hidden;
				image{
					width: 224rpx;
					height: 142rpx;
				}
			}
		}
		.name-wrap{
			width: 100%;
			display: flex;
			justify-content:space-between;
			padding-bottom: 32rpx;
			.name-wrap-left{
				display: flex;
				align-items: center;
				.logo{
					width: 	72rpx;
					height: 72rpx;
					margin-right: 20rpx;
					image{
						width: 	72rpx;
						height: 72rpx;
						border-radius: 100%;
					}
				}
			}
			.name-wrap-right{
				display: flex;
				align-items: center;
				// .name{
				// 	font-size: 28rpx;
				// }
				// .ass-name{
				// 	font-size: 22rpx;
				// 	color: #999;
				// }
			}
		}
		.tap{
			height: 30rpx;
			width: 100%;
			display: flex;
			margin: 20rpx 0;
			align-items: center;
			.tap-list{
				flex: 1;
				text-align: center;
			}
			.tap-list:nth-child(2){
				border-left: 1px solid #ebebeb;
				border-right: 1px solid #ebebeb;
			}
			.tap-list:nth-child(3){
				border-right: 1px solid #ebebeb;
			}
		}
	}
	.fenge{
		width: 100%;
		height: 10rpx;
		background-color: #f7f7f7;
	}
</style>
